import React, { Component } from 'react'
import { Modal } from 'antd'
import reduxStore from '@/redux/store'

export default class Personal extends Component {
    state = {
        isVisible: true
    }

    onOk = () => {
        this.props.onOk()
    }

    render() {
        const { isVisible, onCancel } = this.props
        const { userInfo } = reduxStore.getState()
        return (
            <Modal title="个人中心" visible={isVisible} onOk={this.onOk} onCancel={() => onCancel()}>
                <p>用户名：{userInfo.userName}</p>
            </Modal>
        )
    }
}
